package sg.edu.nus.iss.billing.vo.bill;

import java.util.Date;

import sg.edu.nus.iss.billing.common.Util;

/**
 * @author Chee Ann
 *
 */
public class PaymentVO {
	private String accountNo;
	private double paymentMade;
	private Date paymentDate;
	
	public PaymentVO() {
		
	}
	
	/**
	 * Constructor for DAO
	 */
	public PaymentVO(String accountNo, String paymentMade, String paymentDate) {
		setAccountNo(accountNo);
		double payment = 0;
		try {
			payment = Double.parseDouble(paymentMade);
		} catch (NumberFormatException e) {
			e.printStackTrace();
		}
		setPaymentMade(payment);
		Date date = Util.getDateFromString(paymentDate);
		setPaymentDate(date);
	}

	/**
	 * @return the paymentMade
	 */
	public double getPaymentMade() {
		return paymentMade;
	}
	/**
	 * @param paymentMade the paymentMade to set
	 */
	public void setPaymentMade(double paymentMade) {
		this.paymentMade = paymentMade;
	}
	/**
	 * @return the paymentDate
	 */
	public Date getPaymentDate() {
		return paymentDate;
	}
	/**
	 * @param paymentDate the paymentDate to set
	 */
	public void setPaymentDate(Date paymentDate) {
		this.paymentDate = paymentDate;
	}
	/**
	 * @return the accountNo
	 */
	public String getAccountNo() {
		return accountNo;
	}
	/**
	 * @param accountNo the accountNo to set
	 */
	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}

}
